/*
 * class for templating armors
 */

package item.defensive;

import item.Item;

import java.io.Serializable;

public class Armor extends Item implements DefensiveEnhancement, Serializable, Comparable<Armor> {

	private static final long serialVersionUID = -8709479330958911135L;
	
	public int armor; // the amount of armor this item provides
	
	//creates an Armor object
	
	public String toString() {
		return super.toString() + ": "  + armor;
	}
	
	protected Armor(int cost, int condition, int level, int weight, int armor) {
		super(cost, condition, level, weight);
		this.armor = armor;
	}//end of constructor Armor

	//sets natural ordering by armor values
	
	public int compareTo(Armor o) {
		return o.armor -  this.armor;
	}//end of method compareTo

}//end of class Armor
